Fix desktop inline diff panel layout and resize behavior#1970
Fix desktop inline diff panel layout and resize behavior#1970sabraman wants to merge 8 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc6cd30f0a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ApprovabilityVerdict: Needs human review This PR refactors the desktop diff panel from a sidebar-based implementation to inline rendering with custom resize handling. While purely UI-focused with no security/backend implications, the changes introduce significant new interaction logic (~166 lines of resize handlers) and restructure a core component. The author appears to be a newer contributor to this file. You can customize Macroscope's approvability policy. Learn more. |
7571000 to
b6272ce
Compare
cd196b7 to
0683f25
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0683f25. Configure here.

Summary
This PR fixes a set of closely related desktop diff panel regressions in the web app.
On desktop, opening the diff panel was still affecting the layout in the wrong places. The header needed to stay fixed while the diff opened inside the main messages area and pushed the rest of the post-header content with it. The inline panel also needed to behave like the original implementation during resize, and the diff header turn strip needed a proper edge fade instead of a detached overlay.
What changed
The desktop thread route now mounts the diff panel inline inside
ChatViewinstead of rendering it as a separate sibling sidebar.ChatViewowns the split layout below the header, so the diff opens in the same space as the messages, composer, and checkout toolbar without shifting the header itself.The inline diff panel now has a draggable resize handle with
col-resizecursor feedback. The resize path uses direct DOM width updates during pointer drag and only persists the final width when the drag ends, which restores the smoother behavior from the original implementation and avoids React-driven drag lag.The diff shell layout was also adjusted so desktop inline empty states fill the available height correctly. That keeps states like
No completed turns yet.centered inside the panel instead of sitting at the top of the body.Finally, the diff turn-strip edge fade no longer uses a painted overlay. The fade is now applied to the scrollable content itself with a dedicated
ScrollFadeEffectcomponent and matching mask utilities, which fixes the header misalignment artifact visible while horizontally scrolling the turn chips.User-visible effect
Before this change:

After this change:

Validation
bun fmtbun lint(existing repo warnings only)bun typecheckNotes
This is intentionally scoped to the desktop inline diff layout and its related diff-header interactions. It does not change the mobile diff sheet behavior.
Note
Fix desktop inline diff panel layout and resize behavior in ChatView
DiffPanelInlineSidebarintoChatViewvia newmessagesAsideandmessagesAsideOpenprops, placing the panel below the chat header as a right-side aside.col-resizecursor, width clamping to enforce minimum widths for both the chat column and the panel, and localStorage persistence of the chosen width.ScrollFadeEffectcomponent and supporting CSS scroll-timeline utilities inindex.cssto fade panel scroll edges, with a fallback for browsers without scroll-timeline support.DiffPanelShellno longer sets a fixed width orborder-lin inline mode; it fills available space provided by the parent.diffOpenin the chat thread route.Macroscope summarized dccbb2c.
Note
Medium Risk
Medium risk because it refactors desktop chat/diff layout composition and adds custom pointer-driven resize + width persistence logic, which can affect core chat rendering and responsiveness across viewports.
Overview
Fixes desktop inline diff layout by moving diff rendering into
ChatViewvia newmessagesAside/messagesAsideOpenprops, so opening the diff splits only the post-header content instead of resizing the header.Adds a pointer-based resize handle for the inline diff aside with width clamping,
ResizeObserversync, and persistence to localStorage (chat_diff_inline_width), plus browser tests covering header positioning, collapse behavior during resize sync, and width restore.Improves diff UI polish by making
DiffPanelShellfill its parent (better inline empty-state centering) and by introducingScrollFadeEffect+ new CSS mask utilities to apply a scroll-edge fade directly to the diff turn-strip content.Reviewed by Cursor Bugbot for commit dccbb2c. Bugbot is set up for automated code reviews on this repo. Configure here.